home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 43 / Amiga Format CD43 (1999)(Future Publishing)(GB)(Track 1 of 2)[!][issue 1999-09].iso / -serious- / misc / bhformat / format.h < prev    next >
C/C++ Source or Header  |  1999-06-15  |  3KB  |  79 lines

  1. /*
  2.  *  Format -- disk formatting and file-system creation program
  3.  *  Copyright (C) 1999 Ben Hutchings
  4.  
  5.  *  This program is free software; you can redistribute it and/or modify
  6.  *  it under the terms of the GNU General Public License as published by
  7.  *  the Free Software Foundation; either version 2 of the License, or
  8.  *  (at your option) any later version.
  9.  
  10.  *  This program is distributed in the hope that it will be useful,
  11.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.  *  GNU General Public License for more details.
  14.  
  15.  *  You should have received a copy of the GNU General Public License
  16.  *  along with this program; if not, write to the Free Software
  17.  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  18.  */
  19.  
  20.  
  21. #ifndef __GNUC__
  22. #error "You need to use GNU CC to compile this."
  23. #endif
  24.  
  25. #include <dos/dos.h>
  26. #include <exec/types.h>
  27.  
  28. #ifdef DEBUG
  29. #define D(x) (x)
  30. #else
  31. #define D(x)
  32. #endif
  33.  
  34. /* Maximum length of a name component - I can't find this defined anywhere */
  35. #define MAX_FS_NAME_LEN 30
  36.  
  37. /* Short name for an unsigned 64-bit integer type */
  38. typedef unsigned long long ULLONG;
  39.  
  40. typedef enum {
  41.     ertWarning,    /* Just a warning of some odd condition */
  42.     ertError,    /* Arguments were invalid or system configuration is wierd */
  43.     ertFailure,    /* Something failed, and we can't go on */
  44. } ErrorType;
  45.  
  46. struct DosEnvec;
  47. struct Library;
  48. struct WBStartup;
  49.  
  50. extern struct Library * SysBase, * DOSBase, * GfxBase, * IntuitionBase,
  51.     * GadToolsBase;
  52. extern struct WBStartup * _WBenchMsg;
  53. extern BPTR bpfhStdErr;
  54. extern struct DosEnvec * pdenDevice;
  55. extern char szDosDevice[MAX_FS_NAME_LEN+2];
  56. extern char * pchDosDeviceColon;
  57. extern struct DosList * pdlList, * pdlDevice;
  58. extern ULLONG ibyStart, ibyEnd;
  59.  
  60. void ReportErrSz( ErrorType ert, LONG err, const char * pszMessage, ... );
  61. BOOL bSetSzDosDeviceFromSz( const char * pszDevice );
  62. BOOL bSetSzVolumeFromSz( const char * pszVolume );
  63. BOOL bSetFstFromSz( const char * pszFileSysType );
  64. BOOL bSetDevfFromSz( const char * pszDevFlags );
  65. BOOL bGetDosDevice(void);
  66. void FreeDosDevice(void);
  67. BOOL bGetExecDevice( BOOL bWillVerify );
  68. void FreeExecDevice(void);
  69. BOOL bFormatCylinder( ULONG icyl );
  70. BOOL bVerifyCylinder( ULONG icyl );
  71. BOOL bMakeFileSys( BOOL bFFS, BOOL bOFS, BOOL bIntl, BOOL bNoIntl,
  72.            BOOL bDirCache, BOOL bNoDirCache );
  73. BOOL bMakeFiles( BOOL bDiskIcon );
  74. void FreeAll(void);
  75. void RawDoFmtSz( char * pszBuffer, const char * pszFormat, ... );
  76. void RawDoVFmtSz( char * pszBuffer, const char * pszFormat, APTR pData );
  77. int rcCliMain(void);
  78. int rcGuiMain(void);
  79.